package com.example.waternetwork.api.supervision.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.waternetwork.api.supervision.entity.BaseReservoir;
import com.example.waternetwork.api.supervision.entity.BaseReservoirDispatchPlan;
import com.example.waternetwork.api.supervision.mapper.BaseReservoirMapper;
import com.example.waternetwork.api.supervision.service.IBaseReservoirService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 水库基础信息表 服务实现类
 * </p>
 *
 * @author auto gen
 * @since 2025-06-30
 */
@Service
public class BaseReservoirServiceImpl extends ServiceImpl<BaseReservoirMapper, BaseReservoir> implements IBaseReservoirService {

    @Override
    public  BaseReservoir getResInfoByCode(String code){
        QueryWrapper<BaseReservoir>queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(BaseReservoir::getCode,code);
        return this.getOne(queryWrapper);
    }

}
